package com.ruoyi.hyg.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

public class DailyPractice extends BaseEntity {
    private static final long serialVersionUID = 1L;
    
    @Excel(name = "记录ID")
    private Long id;
    
    @Excel(name = "用户ID")
    private Long userId;
    
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "练习日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date practiceDate;
    
    @Excel(name = "刷题数量")
    private Long questionCount;
    
    @Excel(name = "学习时间", readConverterExp = "分=钟")
    private Long studyTime;
    
    @Excel(name = "删除标记")
    private Long del;
    
    @Excel(name = "奖励积分")
    private Integer pointsAwarded;
    
    @Excel(name = "当日排名")
    private Integer rank;
    
    // 用户信息字段（用于排行榜显示）
    private String userName;
    
    private String userAvatar;
    
    public Long getId() {
        return id;
    }
    
    public void setId(Long id) {
        this.id = id;
    }
    
    public Long getUserId() {
        return userId;
    }
    
    public DailyPractice setUserId(Long userId) {
        this.userId = userId;
        return this;
    }
    
    public Date getPracticeDate() {
        return practiceDate;
    }
    
    public void setPracticeDate(Date practiceDate) {
        this.practiceDate = practiceDate;
    }
    
    public Long getQuestionCount() {
        return questionCount;
    }
    
    public void setQuestionCount(Long questionCount) {
        this.questionCount = questionCount;
    }
    
    public Long getStudyTime() {
        return studyTime;
    }
    
    public void setStudyTime(Long studyTime) {
        this.studyTime = studyTime;
    }
    
    public Long getDel() {
        return del;
    }
    
    public void setDel(Long del) {
        this.del = del;
    }
    
    public Integer getPointsAwarded() {
        return pointsAwarded;
    }
    
    public void setPointsAwarded(Integer pointsAwarded) {
        this.pointsAwarded = pointsAwarded;
    }
    
    public Integer getRank() {
        return rank;
    }
    
    public void setRank(Integer rank) {
        this.rank = rank;
    }
    
    public String getUserName() {
        return userName;
    }
    
    public void setUserName(String userName) {
        this.userName = userName;
    }
    
    public String getUserAvatar() {
        return userAvatar;
    }
    
    public void setUserAvatar(String userAvatar) {
        this.userAvatar = userAvatar;
    }
    
    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("userId", getUserId())
                .append("practiceDate", getPracticeDate())
                .append("questionCount", getQuestionCount())
                .append("studyTime", getStudyTime())
                .append("createTime", getCreateTime())
                .append("del", getDel())
                .toString();
    }
}